Because I can not modify my homework page, I'm adding some more thing here.

mpo663_hw1_cape_like_energy_sil.png

What I did is
I integrated B for the positive area to get CAPE value.
      %%-----------------------------------
      % #11
      %------------------------------------
      %% Buoyancy and CAPE like energy
      %-------------------------------------
        h=figure(10)
        subplot(1,2,1)
        plot(B,z/1000, '-k'); title('Buoyancy');
        ylabel('height (km)');
        line([0 0],[0 18], 'linestyle', '--');
 
        xx=find(B > 0);
        nx=length(xx); % 133
 
        for k=2:nx % I want to integrate from the 2nd point
        nB(k-1)=B(xx(k));
        nz(k-1)=z(xx(k));
        end
 
        CAPElike2=trapz(nz,nB); % I gave me one value
 
        hold on
        plot(B(xx),z(xx)/1000, 'or', 'markersize', 2.0);
 
 
        subplot(1,2,2)
        plot(CAPElike,z/1000, '-k'); title('CAPE like energy');
        ylabel('height (km)');
        line([0 0],[0 18], 'linestyle', '--');
 
        text(-0.2, 10, ['CAPE =' num2str(fix(CAPElike2)),' J/kg'],'FontSize',18)



matlab code :

purpose : I'm curious about the relationship between (1) surface temperature and cloud thickness and (2) surface temperature and LCL level, whether (1) thicker clouds and (2) low clouds (=low LCL) will increase surface temperature.

Final two figures

Figure 1: surface temperature v.s. cloud thickness (The reason that I can use RH instead of LCL, see Fig4)
The dotted lines are mean RH and temp Ts.
??? It's not a exact linear. what happened surface temperature higher than ~28?
MPO663_hw1_more_h_203.jpg


Figure 2: surface temperature v.s. LCL level
??? no dependence....at least IR temp > -40c (or can we say linear relation between them?)
??? Lower then -40: ice?? envil??
MPO663_hw1_more_h_205.jpg

For all figures below here: processes to reach the above two figures.

Figure 3
MPO663_hw1_more_h_201.jpg
We can see from the above figures : we can use RH instead of a real LCL height. We'll see the figure (below) looks same as the 1st figure.


Figure 4 (below):

MPO663_hw1_more_h_202.jpg

Figure 5 (below)
MPO663_hw1_more_h_204.jpg

we can see from the above figure: the level of IR temperature (cloud top) changes significantly, while LCL height does not change that much (compared with cloud top height). So I only use IR temperature to see the thickness of cloud (instead of cloud top height - LCL height)